package demo1;

import javax.swing.border.CompoundBorder;

public class People extends Adult{
    String name;
    String sex;
    int age;

    public People(){

    }

    public People(String name, String sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public People(String name, String sex, int age,boolean marriage, String address) {
        super(marriage, address);
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    @Override
    public void working() {
        System.out.println(this.name + "正在给人看病！");
    }

    public void eating(String food){
        System.out.println(this.name + "正在吃：" + food);
    }

    @Override
    public void recreation() {
        System.out.println(this.name + "的娱乐爱好是五禽戏");
    }

    public void show(){
        System.out.println(
                "姓名：" + this.name + ", " +
                "性别：" + this.sex + ", " +
                "年龄：" + this.age + ", " +
                "婚姻：" + this.marriage + ", " +
                "住址：" + this.address
        );
    }
}
